﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TAS.XtOM.Tutorial.Web.Models.LinkedIn.LIPerson>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Xml to Object Mapper Tutorial Web
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Basic LinkedIn Example</h2>
	<% if (!string.IsNullOrEmpty(Model.ImageUrl)) {%>
		<img src="<%: Model.ImageUrl %>" alt="LinkedIn Profile Picture" />
	<% } %>
    <fieldset>
        <legend>Fields</legend>
        <div class="display-label">Id</div>
        <div class="display-field"><%: Model.Id %></div>
        
        <div class="display-label">GivenName</div>
        <div class="display-field"><%: Model.GivenName %></div>
        
        <div class="display-label">FamilyName</div>
        <div class="display-field"><%: Model.FamilyName %></div>
        
        <div class="display-label">Specialties</div>
        <div class="display-field"><%: Model.Specialties %></div>
        
        <div class="display-label">Industry</div>
        <div class="display-field"><%: Model.Industry %></div>
        
        <div class="display-label">NumberOfConnections</div>
        <div class="display-field"><%: Model.NumberOfConnections %></div>
        
        <div class="display-label">Interests</div>
        <div class="display-field"><%: Model.Interests %></div>
        
        <div class="display-label">BirthYear</div>
        <div class="display-field"><%: Model.BirthYear %></div>
        
        <div class="display-label">BirthMonth</div>
        <div class="display-field"><%: Model.BirthMonth %></div>
        
        <div class="display-label">BirthDay</div>
        <div class="display-field"><%: Model.BirthDay %></div>
        
        <div class="display-label">MainAddress</div>
        <div class="display-field"><%: Model.MainAddress %></div>
        
        <div class="display-label">Headline</div>
        <div class="display-field"><%: Model.Headline %></div>
        
        <div class="display-label">LocationName</div>
        <div class="display-field"><%: Model.LocationName %></div>
        
        <div class="display-label">CountryCode</div>
        <div class="display-field"><%: Model.CountryCode %></div>
        
        <div class="display-label">MobilePhone</div>
        <div class="display-field"><%: Model.MobilePhone %></div>
        
        <div class="display-label">WorkPhone</div>
        <div class="display-field"><%: Model.WorkPhone %></div>
        
    </fieldset>
		<h3>Educations</h3>
	    <table>
        <tr>
            <th>
                Id
            </th>
            <th>
                Activities
            </th>
            <th>
                Degree
            </th>
            <th>
                Field Of Study
            </th>
            <th>
                Notes
            </th>
            <th>
                School Name
            </th>
            <th>
                Starting Year
            </th>
            <th>
                Starting Month
            </th>
        </tr>

    <% foreach (var item in Model.Educations) { %>
    
        <tr>
            <td>
                <%: item.Id %>
            </td>
            <td>
                <%: item.Activities %>
            </td>
            <td>
                <%: item.Degree %>
            </td>
            <td>
                <%: item.FieldOfStudy %>
            </td>
            <td>
                <%: item.Notes %>
            </td>
            <td>
                <%: item.SchoolName %>
            </td>
            <td>
                <%: item.StartYear %>
            </td>
            <td>
                <%: item.StartMonth %>
            </td>
        </tr>
    
    <% } %>

    </table>
</asp:Content>
